﻿using WeDonekRpc.Helper.Validate;

namespace Shop.RemoteModel.GoodsSku.Model
{
    public class GoodsSkuSet
    {
        /// <summary>
        /// 商品SKU编号
        /// </summary>
        [NullValidate("shop.goods.sku.num.null")]
        [LenValidate("shop.goods.sku.num.len", 2, 64)]
        [FormatValidate("shop.goods.sku.num.error", ValidateFormat.数字字母)]
        public string GoodsSku { get; set; }

        /// <summary>
        /// 规格名 
        ///</summary>
        [NullValidate("shop.goods.name.null")]
        [LenValidate("shop.goods.name.len", 2, 50)]
        public string SkuName { get; set; }
        /// <summary>
        /// 封面图
        /// </summary>
        [LenValidate("shop.goods.cover.img.len", 0, 100)]
        [FormatValidate("shop.goods.cover.img.error", ValidateFormat.图片URI)]
        public string SkuImg { get; set; }

        /// <summary>
        /// 小程序主图
        /// </summary>
        [LenValidate("shop.goods.img.num", 0, 10)]
        [FormatValidate("shop.goods.img.url.error", ValidateFormat.图片URI)]
        public string[] ImgList { get; set; }


        /// <summary>
        /// 说明图片
        /// </summary>
        [LenValidate("shop.goods.show.img.len", 0, 20)]
        [FormatValidate("shop.goods.show.img.error", ValidateFormat.图片URI)]
        public string[] ImgShow { get; set; }

        /// <summary>
        /// 价格 
        ///</summary>
        [NumValidate("shop.goods.price.error", 0)]
        public decimal Price { get; set; }

        /// <summary>
        /// 简要说明 
        ///</summary>
        [LenValidate("shop.goods.show.len", 0, 100)]
        public string Show { get; set; }


        /// <summary>
        /// 重量 
        ///</summary>
        [NumValidate("shop.goods.weight.error", 0)]
        public int Weight { get; set; }
        /// <summary>
        /// 体积 
        ///</summary>
        [NumValidate("shop.goods.volume.error", 0)]
        public int Volume { get; set; }

        /// <summary>
        /// 属性列表
        /// </summary>

        public GoodsAttr[] Attrs { get; set; }

        /// <summary>
        /// 文件ID
        /// </summary>
        public long[] FileId { get; set; }
    }
}
